From: Sebastian Keller Date: Tue, 22 Aug 2017 17:05:11 +0000 (+0200) Subject: workspace: Align window previews with the pixel grid X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~99 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a02399eea4a3fbf46aa3be35198f6ad3b861e6c8;p=gnome-shell.git workspace: Align window previews with the pixel grid Now that full-sized window previews are allowed again it makes sense to align the window previews with the pixel grid to prevent unscaled windows from looking blurry in the overview. --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index eb24e2538..e6a6da919 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -948,6 +948,10 @@ var LayoutStrategy = new Lang.Class({ let cloneX = x + (cellWidth - cloneWidth) / 2; let cloneY = row.y + row.height * row.additionalScale - cellHeight + compensation; + // Align with the pixel grid to prevent blurry windows at scale = 1 + cloneX = Math.floor(cloneX); + cloneY = Math.floor(cloneY); + slots.push([cloneX, cloneY, s, window]); x += cellWidth + this._columnSpacing; }